Methods and devices for booting a network attached storage with two logical units

ABSTRACT

A data storage device may comprise data storage comprising a first logical unit configured to store user data and a second logical unit configured to store an operating system. A first interface may be configured to couple to a host and a second interface may be configured to couple to a network. In a first mode, the data storage device may be configured to expose the first logical unit to the host and render the second logical unit inaccessible and, in a second mode, the data storage device may be configured to allow access to both the first and the second logical units. The first mode may comprise a direct attached storage (DAS) mode and the second mode may comprise a network attached storage (NAS) mode.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to and the benefit of U.S. ProvisionalApplication No. 61/826,919 (Atty. Docket No. T6481.P), filed on May 23,2013, which is hereby incorporated by reference in its entirety.

BACKGROUND

Typically, external disk drive products are either configured as DirectAttached Storage (DAS) or Network Attached Storage (NAS) drives. DASdrives can only be used with one computer at a time and are connectedusing a Universal Serial Bus (USB), Thunderbolt, 1394, eSATA, or othertype of cable. NAS drives have an Ethernet or wireless LAN (Wi-Fi)interface and can be accessed by multiple computers simultaneously.

DAS devices are generally simpler in design than NAS drives, in that DASdrives need only allow the host (e.g., a PC) to read/write data sectorson its hard disk drive (HDD); they do not parse the file system that thehost creates and do not manage the user's files. Because DAS drivesoperate at the sector level, hosts can create any number of partitionsand file systems on the drive. A NAS drive, in contrast, is essentiallya small server: it can run a mainstream operating system (OS) such as acustomized version of Linux or Microsoft Windows, for example, andprovides file sharing services and other features. NAS devices managetheir HDDs the same way a full-featured personal computer (PC) or serverdoes, as they partitions their drive(s) according to their requirementsand do not allow the user to create arbitrary partitions.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a USB device.

FIG. 2 is a block diagram of a NAS device.

FIG. 3 is a block diagram of a device selectively configurable as a DASdevice or as a NAS device, according to one embodiment.

FIG. 4 is a block diagram of a memory storage comprising two logicalunits, according to one embodiment.

FIG. 5 is a flowchart of a method of operating a data storage devicethat comprises a first interface configured to couple to a host and asecond interface configured to couple to a network, according to oneembodiment.

DETAILED DESCRIPTION Definitions

DAS: Direct Attached Storage; e.g., an external, bus-connected (e.g.,via Universal Serial Bus (USB), Thunderbolt or the like) storage system.DAS refers to a digital storage system directly attached to a server orworkstation, without an intervening storage network. The acronym DAS ismainly used to differentiate non-networked storage from Storage AreaNetwork (SAN) and NAS. A DAS may comprise a data storage device (forexample enclosures holding a number of hard disk drives) connecteddirectly to a computer through a host bus adapter (HBA), without anetwork device (such as a hub, switch, or router) therebetween. The mainprotocols used for DAS connections are ATA, SATA, eSATA, SCSI, SAS andUSB, Firewire (IEEE 1394).

NAS: Network Attached Storage; e.g., an external network-connected(e.g., via Ethernet, Wi-Fi interface or the like) storage system. A NASnot only operates as a file server, but is specialized for this taskeither by its hardware, software, or combinations thereof. NAS devicesusually do not have a keyboard or display, and are controlled andconfigured over the network, often using a browser.

LBA: Logical Block Address. The location of a data sector on a hard diskdrive.

Logical Unit: An endpoint within a device that processes commands sentby the host (e.g., a PC.) A device may have multiple logical units withdifferent characteristics and features; e.g., a disk drive and a CD-ROM.

NAS

NAS devices are gaining in popularity as a convenient method of sharingfiles among multiple computers. Potential benefits of NAS devices, ascompared to file servers, include faster data access, easieradministration, and simple configuration. NAS systems are networkedappliances which may comprise one or more data storage devices (e.g.,HDDs, SSDs, hybrid drives, or the like), sometimes arranged intological, redundant storage containers or a Redundant Array ofInexpensive Disks (RAID). NAS can remove the responsibility of fileserving from other servers on the network. NAS devices may provideaccess to files using network file sharing protocols such as NFS, ServerMessage Block/Common Internet File System (SMB/CIFS), or AFP.

A full-featured OS is not needed on a NAS device, which may comprise astripped-down OS. For example, FreeNAS, an open source NAS solutiondesigned for commodity PC hardware, may be implemented as astripped-down version of FreeBSD. NAS systems may comprise one or moredata storage devices, which may be arranged into logical, redundantstorage containers or RAID. NAS may use file-based protocols such as NFS(popular on UNIX systems), SMB/CIF (used with MS Windows systems), AFP(used with Apple Macintosh computers), or NCP (used with OES and NovellNetWare). NAS devices need not limit clients to a single protocol.

NAS vs. DAS

A DAS device may be coupled to a server, laptop, desktop or the like andmay not necessarily be networked. For example, the DAS device may serveas supplementary storage for a stand-alone computer or may serve assupplementary storage for a networked file server. In contrast, NASdevices are designed as an easy and self-contained solution for sharingfiles over a network. Both DAS and NAS may be configured to increaseavailability of data by using RAID or clustering. When both are presenton a network, a NAS device may exhibit somewhat better performance thana DAS device, as the NAS device can be tuned precisely for file serving,which is less likely to happen on a server (to which the DAS is coupled)or general purpose computer that is responsible for other processing.Both NAS and DAS device may comprise cache memory, which may positivelyaffect performance. When comparing use of NAS with use of local(non-networked) DAS, the performance of NAS may depend primarily on thespeed of and congestion on the network.

NAS devices are generally not as customizable in terms of hardware (CPU,memory, storage components) or software (extensions, plug-ins,additional protocols) as a general-purpose server supplied with DAS. Atypical DAS drive, such as an external USB disk drive, allows the userto freely partition the drive. The host to which the drive is coupledassumes complete control of the drive's partitions and file systems.Conversely, a typical NAS drive is the sole manager of its drivepartitions. NAS drives may comprise one or more partitions to store theNAS operating system and one large partition for the user's data. NASdrives allow networked hosts to read/write files in the user's datapartition but do not allow the user to re-partition the disk.

One embodiment selectively configures a disk drive to operate in a firstmode as a DAS device or in a second mode as a NAS device. According toone embodiment, the disk drive may be configured to comprise at leasttwo logical units, at least one of which may be configured to store theNAS operating system and optionally other NAS related software, with theremaining one or ones being configured to store user data. When thedrive is configured to operate in a first mode (e.g., DAS mode), onlythe logical unit or units configured to store user data may be exposedto the host. In the second mode (e.g., NAS mode), the one or morelogical units storing the NAS OS may be exposed to NAS systemcontroller, as may be the logical unit or units configured to store userdata. The NAS system controller may then boot from the logical unit(s)storing the NAS OS (or from some other location storing the NAS OS),thereby enabling the drive to configure itself as a NAS and to provideNAS functionality.

FIG. 1 is a block diagram of a USB storage device. As shown therein, aHDD 102 is coupled to a USB bridge controller 104 and communicates via aUBS port 106. FIG. 2 is a block diagram of a NAS device. As showntherein, HDD 102 is coupled to USB bridge controller 104, which iscoupled to a NAS system controller 202, which may interface with a LocalArea Network (LAN) 204 and a wireless connection (e.g., Wi-Fi) 206.

According to one embodiment, a combination of a DAS and NAS device maybe configured to enable a host computer to create any partition (as isthe case with DAS drives) while also managing the file systems, toenable it operate as a file server (as do NAS drives). Accordingly, oneembodiment enables the NAS operating system to manage the partitions perits requirements, while also allowing the user to freely partition thedrive. Such may be accomplished, according to one embodiment, by a drivethat is alternately usable as both DAS and NAS. According to oneembodiment, when such a drive is coupled to a host (e.g., plugged into aPC using a USB cable), the drive may be configured to operate in afirst, e.g., DAS mode. Conversely, when such a drive is coupled to acabled Ethernet connection or accesses a wireless LAN (e.g., Wi-Fi),then the drive may be configured to operate in a second, e.g., NAS mode.When so configured as a NAS device, the disk drive may be configured tostore the user's data as well as the NAS operating system (e.g., Linux),software, and the like. According to one embodiment, that portion (e.g.,range of LBAs or partition) of the drive storing the NAS OS and itsvarious drivers and other software may be configured so as to not beexposed to the host or user as storage that is accessible, lest the hostor user make changes thereto that could break or impair the NASfunctionality of the drive.

FIG. 3 is a block diagram of a device 300 that is selectivelyconfigurable as a DAS device or as a NAS device, according to oneembodiment. As shown therein, a HDD 302 (which may comprise rotatingand/or fixed storage media) may be coupled to a bridge controller 304,via a, for example, ATA, SATA, eSATA, SCSI or SAS connection. The bridgecontroller 304 may be configured to communicate with a port 310 that maybe configured according to, for example, the USB protocol. According toone embodiment, the HDD 302 may be solely coupled to the bridgecontroller 304. The bridge controller 304 may comprise, for example, an8-bit or 32-bit microcontroller. A NAS system controller 306 may becoupled to the bridge controller 304 and may access the HDD 302 throughthe bridge controller 304. The NAS system controller 306 may comprise,for example, a System on Controller (SoC) comprising an, e.g., 32-bitmicroprocessor, together with other ancillary systems, such as dynamicrandom access memory (DRAM), a memory manager and/or other peripheralcontrollers. A multiplexor (mux) 308 may be configured to couple thebridge controller 304 to either the NAS system controller (SoC) 306 or afirst interface, such as interface port 310 configured according to afirst communication protocol such as, for example, USB. The NAS SoC 306and the bridge controller 304 may be configured to coordinate thecontrol of the mux 308 as shown at 307 and determine whether the deviceis to be configured and operate as a DAS or as a NAS. Other controlcircuitry may, according to one embodiment, be interposed between thebridge controller 304 and the NAS system controller 306 for the purposeof, for example, generating the control signal 307 to the mux 308. TheNAS system controller 306 and the bridge controller 304, according toone embodiment, may be included in a single integrated circuit orassembly.

According to one embodiment, when a connection to the drive's USBinterface port(s) 310 is detected, such as when interface port 310 iscoupled to a host (e.g., plugged into a PC) and processing data accesscommands for the host, the mux 308 may be controlled such that thedevice 300 is configured in a first mode in which the bridge controller304 is connected to the USB port 310. In this configuration, the NAScontroller 306 may be inactive or at least decoupled from the data path.According to one embodiment, when a connection to the drive's USBinterface port(s) 310 is not detected, such as when the USB interfaceport 310 is not plugged in to a host or is being used solely to chargethe HDD's internal rechargeable batteries, then the mux 308 may becontrolled, according to one embodiment, so that the device isconfigured in a second mode in which the NAS system controller 306accesses and boots from the HDD 302. In this configuration, the HDD 302may be configured to store and serve up files in NAS mode, as requestedfrom devices coupled to the LAN 312 and/or to the Wi-Fi 314.Alternatively, according to one embodiment, a non-volatile memory 316may be coupled to the NAS system controller 306. Such a non-volatilememory 316 may be configured to store the NAS OS. In this case, when theUSB interface port 310 is not plugged in to a host or is being usedsolely to charge the HDD's internal rechargeable batteries, the NASsystem controller 306 may access the non-volatile memory 316 and bootits OS from the copy thereof stored in the non-volatile memory 316. Inthis configuration, the NAS system controller 306 may boot its OS fromthe non-volatile memory 316 at power-up and may remain booted (and thusimmediately available for file serving duties) at all times. Accordingto one embodiment, the HDD 302 may comprise a plurality of disk drives,which may be in a RAID configuration.

One embodiment addresses the manner in which the user's data and NASoperating system is organized on the mass storage device, in the case inwhich the NAS OS is stored on the HDD 302. According to one embodiment,the HDD may be logically divided into two areas; namely, a first (e.g.,large) portion for the user's data files, and a second (e.g., smaller)area for the NAS operating system and software, as shown in FIG. 4. Asshown therein, reference numeral 400 represents the usable storage spaceon a mass storage device such as a HDD. According to one embodiment, theuser area 402, configured to store the user's data, may span from LBA 0to LBA n and may represent a first logical unit. The portion of the massstorage device reserved for the NAS' OS and other NAS-related softwaremay span, for example, from LBA n+1 to LBA max, where max corresponds tothe highest numbered available LBA, and the span from LBA n+1 to LBA maxmay represents a second logical unit. According to one embodiment, whenthe drive is operating in DAS mode, the bridge controller 304 may exposeonly the first logical unit 402 to the host and use, from LBA to LBA n.The second logical unit, from LBA n+1 to LBA max, is not exposed to thehost or user when the drive is operating in DAS mode and is thuseffectively hidden while the HDD is configured in DAS mode. According toa one embodiment, the two portions of the HDD 302 need not be configuredas physically distinct logical units, but may use overlapping “virtual”logical units. For example, in DAS mode, the HDD may be configured toreport that its size spans from LBA 0 to LBA n, i.e., not reporting tothe host even the existence of the LBAs ranging from LBA n+1 to LBA max.In NAS mode, the HDD may be configured to report that its size spansfrom LBA0 to LBA max, thereby enabling the NAS system controller 306access to the entire range of LBAs, including that portion thereofspanning from LBA n+1 to LBA max, from which the NAS system controller306 may boot its OS, if the NAS OS is indeed stored within that LBArange.

In the case in which HDD 302 is configured with two logical units, whenthe drive is configured to operate in NAS mode; that is, when the mux308 couples the bridge controller 304 to the NAS system controller 306,the USB bridge may expose both the first logical unit 402 and the secondlogical unit 404. This enables the NAS system controller 306 to,according to one embodiment, boot up from the NAS OS stored on thesecond logical unit 404 on the HDD 302 and to carry out NAS-specificfunctionality. Indeed, exposing the first logical unit enables access tothe user-data area, i.e., LBA 0 to n. Exposing the second logical unitenables access to the NAS operating system area, i.e., LBA n+1 to LBAmax. The NAS system controller 306 may be configured, according to oneembodiment, to boot from the second logical unit 404 and to allownetworked hosts (not shown) to access the user's data on the firstlogical unit 402, from either the LAN 312 (e.g., an Ethernet connection)or through Wi-Fi 314.

Since, according to one embodiment, the HDD's capacity may be presentedas two different logical units by the bridge controller 304, eachlogical unit, according to one embodiment, may be partitionedindependently. Indeed, the disk's first logical unit 402 may be freelypartitioned when the HDD is coupled to a host such as a PC in DAS mode,and the second logical unit 404 storing the NAS OS may be partitioned asneeded for and by the NAS system controller 306.

The NAS system controller 306, according to one embodiment, may beconfigured to boot from the second logical unit 404, which may store theNAS OS files. Once the NAS operating system is loaded, it may operate inthe same or a similar manner as the OS in any other NAS device, in thatit may be configured to mount the file system(s) on the first logicalunit 402 and to allow access to the mounted file system by networkedhosts.

FIG. 5 is a flowchart of a method of operating a data storage devicethat comprises a first interface configured to couple to a host and asecond interface configured to couple to a network, according to oneembodiment. As shown therein, Block B51 calls for configuring a datastorage device to comprise a first logical unit and a second logicalunit, and Block B52 calls for storing a (e.g., NAS) operating system inthe second logical unit of the data storage device. Thereafter, the datastorage device may be configured in a first mode as shown at Block B54or in a second mode, as shown at B55. Block B54, as shown in FIG. 5,calls for configuring the data storage device in the first mode, inwhich only the first logical unit is exposed to the host, to enablestorage of data therein. As also shown in B54, the first mode configuresthe data storage device such that the second logical unit is not exposedto the host and is, therefore, inaccessible to the host. As shown atB55, the data storage device, in the second mode, may be configured toenable access to both the first and the second logical units.

While certain embodiments of the disclosure have been described, theseembodiments have been presented by way of example only, and are notintended to limit the scope of the disclosure. Indeed, the novelmethods, devices and systems described herein may be embodied in avariety of other forms. Furthermore, various omissions, substitutionsand changes in the form of the methods and systems described herein maybe made without departing from the spirit of the disclosure. Theaccompanying claims and their equivalents are intended to cover suchforms or modifications as would fall within the scope and spirit of thedisclosure. For example, those skilled in the art will appreciate thatin various embodiments, the actual physical and logical structures maydiffer from those shown in the figures. Depending on the embodiment,certain steps described in the example above may be removed, others maybe added. Also, the features and attributes of the specific embodimentsdisclosed above may be combined in different ways to form additionalembodiments, all of which fall within the scope of the presentdisclosure. Although the present disclosure provides certain preferredembodiments and applications, other embodiments that are apparent tothose of ordinary skill in the art, including embodiments which do notprovide all of the features and advantages set forth herein, are alsowithin the scope of this disclosure. Accordingly, the scope of thepresent disclosure is intended to be defined only by reference to theappended claims.

What is claimed is:
 1. A data storage device, comprising: data storagecomprising a first logical unit configured to store user data and asecond logical unit configured to store an operating system; a firstinterface configured to couple to a host; and a second interfaceconfigured to couple to a network, wherein, in a first mode, the datastorage device is configured to expose the first logical unit to thehost and render the second logical unit inaccessible and, in a secondmode, the data storage device is configured to allow access to both thefirst and the second logical units.
 2. The data storage device of claim1, wherein the first mode is enabled when a connection to the firstinterface is detected.
 3. The data storage device of claim 1, whereinthe second mode is enabled when a connection to the first interface isnot detected.
 4. The data storage device of claim 1, wherein the datastorage comprises a plurality of disks.
 5. The data storage of claim 4,wherein the plurality of disks are in a Redundant Array of InexpensiveDisks (RAID) configuration.
 6. The data storage device of claim 1,wherein the second mode is enabled when a connection to the firstinterface is detected
 7. The data storage device of claim 1, wherein thefirst mode comprises a direct attached storage (DAS) mode.
 8. The datastorage device of claim 1, wherein the second mode comprises a networkattached storage (NAS) mode.
 9. The data storage device of claim 1wherein, in the second mode, the data storage device is furtherconfigured to boot the operating system stored in the second logicalunit.
 10. The data storage device of claim 1, wherein the first logicalunit spans a first predetermined range of logical block addresses (LBAs)and wherein the second logical unit spans a second predetermined rangeof LBAs that does not overlap with the first predetermined range ofLBAs.
 11. The data storage device of claim 1, further comprising a firstcontroller and a second controller wherein the second controller is onlyactive when the data storage device operates in the second mode.
 12. Thedata storage device of claim 11, wherein the second controller iscoupled to the second interface.
 13. The data storage device of claim12, wherein the first controller is selectively configured to be coupledto one of the first interface and the second controller.
 14. The datastorage device of claim 11, further comprising a multiplexer coupled tothe first interface and to the second controller, the multiplexer beingconfigured to couple the first interface to the first controller whenthe data storage device operates in the first mode and to couple thesecond controller to the first controller when the data storage deviceoperates in the second mode.
 15. The data storage device of claim 1,wherein the second interface is configured to selectively couple to awired network connection and to a wireless network connection.
 16. Amethod of operating a data storage device that comprises a firstinterface configured to couple to a host and a second interfaceconfigured to couple to a network, the method comprising: configuringdata storage of the data storage device to comprise a first logical unitand a second logical unit; storing an operating system in the secondlogical unit; and configuring the data storage device to operate in oneof a first mode and a second mode wherein, in the first mode, only thefirst logical unit is exposed to the host to enable storage of user datatherein and the second logical unit is inaccessible and wherein in thesecond mode, the data storage device is configured to allow access toboth the first and the second logical units.
 17. The method of claim 16,further comprising detecting a connection on the first interface andconfiguring the data storage device to operate in the first mode whenthe connection is detected on the first interface and configuring thedata storage device to operate in the second mode when the connection isnot detected on the first interface.
 18. The method of claim 16, furthercomprising detecting a connection on the first interface and configuringthe data storage device to operate in the second mode when theconnection is detected on the first interface.
 19. The method of claim16, wherein the first mode comprises a direct attached storage (DAS)mode.
 20. The method of claim 16, wherein the second mode comprises anetwork attached storage (NAS) mode.
 21. The method of claim 17, furthercomprising booting the operating system stored in the second logicalunit when the connection is not detected on the first interface.
 22. Themethod of claim 16, data storage device of claim 1, wherein the datastorage comprises a plurality of disks.
 23. The method of claim 22,wherein the plurality of disks are in a Redundant Array of InexpensiveDisks (RAID) configuration.
 24. The method of claim 16, whereinconfiguring comprises defining the first logical unit to span a firstpredetermined range of logical block addresses (LBAs) and defining thesecond logical unit to span a second predetermined range of LBAs thatdoes not overlap with the first predetermined range of LBAs.
 25. Themethod of claim 16, wherein the data storage device comprises a firstcontroller and a second controller and wherein the method furthercomprises configuring the second controller to process data accesscommands only when the data storage device operates in the second mode.26. The method of claim 25, wherein the second controller is coupled tothe second interface and wherein the first controller is selectivelyconfigured to be coupled to one of the first interface and the secondcontroller.
 27. The method of claim 25, further comprising: coupling thefirst interface to the first controller when the data storage deviceoperates in the first mode, and coupling the second controller to thefirst controller when the data storage device operates in the secondmode.
 28. The method of claim 16, wherein the second interface isconfigured to selectively couple to a wired network connection and to awireless network connection.
 29. A data storage device, comprising: afirst interface configured to couple to a host; a second interfaceconfigured to couple to a network; a first controller coupled to thefirst interface and operative to configure the data storage device as anetwork attached storage (NAS); a second controller selectably coupledto one of the first interface and the first controller and operative toconfigure the data storage device as a direct attached storage (DAS)device; and a switch controlled by the second controller, the switchbeing configured to selectively couple the second controller to one ofthe first interface and the first controller.
 30. The data storagedevice of claim 29, wherein the switch comprises a multiplexer.
 31. Thedata storage device of claim 29, further comprising data storagecomprising a first logical unit configured to store user data and asecond logical unit configured to store an operating system.